package nextoffer;

/**
 * @author ：szq
 * @date ：Created in 2022/3/17 20:21
 * @description：剑指 Offer 27. 二叉树的镜像
 * @modified By：
 * @version: $
 */
public class mirrorImageOfTheBinaryTree {
    public TreeNode mirrorTree(TreeNode root) {
        if(root==null)return  root;
        jiao(root.left,root.right);
        return  root;

    }

    public void jiao(TreeNode left, TreeNode right)
    {

        TreeNode ne = left;left = right ; right = ne;
        jiao(left.left,left.right);
        jiao(right.left,right.right);

    }

    public static void main(String[] args) {
        int[][] dp={{0,1},{1,0},{0,-1},{-1,0}};
    }

}
